+        title = "详情"
59 61
         binding()
60 62
         setup()
61 63
     }
@@ -80,19 +82,13 @@ final class PhotoDetailViewController: UIViewController {
80 82
     }
81 83
 }
82 84
 
83
-//MARK textField delegate
84
-extension PhotoDetailViewController: UIGestureRecognizerDelegate {
85
-    // MARK: textField
86
-
87
-    func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldReceive touch: UITouch) -> Bool {
88
-        return commentTextField.isFirstResponder
89
-    }
90
-    
91
-}
92
-
93
-
94 85
 /// bind storyboard gesture action
95 86
 extension PhotoDetailViewController {
87
+    
88
+    @IBAction func recyclingKeyboard(_ sender: UITapGestureRecognizer) {
89
+        commentTextField.resignFirstResponder()
90
+    }
91
+    
96 92
     @IBAction func purchase(_ sender: UITapGestureRecognizer) {
97 93
         
98 94
     }
@@ -105,7 +101,7 @@ extension PhotoDetailViewController {
105 101
 /// bind storyboard button action
106 102
 extension PhotoDetailViewController {
107 103
     @IBAction func share() {
108
-        let ctl = UIStoryboard.photoDetail.instantiateController(ShareController.self)
104
+        let ctl = UIStoryboard.photoDetail.instantiateController(ShareViewController.self)
109 105
         ctl.shareContent = "我使用拍爱分享了一张美图,你也快来试试吧"
110 106
         //        ctl.shareImgUrlThumb = datas[currentPhotoIndex].photo_thumbnail_url
111 107
         //        ctl.shareUrl = datas[currentPhotoIndex].photo_share_url
@@ -283,6 +279,9 @@ extension PhotoDetailViewController {
283 279
             .notification(UIResponder.keyboardWillShowNotification)
284 280
             .takeUntil(self.rx.deallocated)
285 281
             .subscribe { [unowned self] notification in
282
+                
283
+                self.keyboardGestureRcognizer.isEnabled = true
284
+                
286 285
                 guard let userInfo = notification.element?.userInfo,
287 286
                     let keyboardFrame = userInfo[UIResponder.keyboardFrameEndUserInfoKey] as? CGRect,
288 287
                     let timeInterval = userInfo[UIResponder.keyboardAnimationDurationUserInfoKey] as? TimeInterval,
@@ -301,6 +300,8 @@ extension PhotoDetailViewController {
301 300
             .notification(UIResponder.keyboardWillHideNotification)
302 301
             .takeUntil(self.rx.deallocated)
303 302
             .subscribe { [unowned self] notification in
303
+                self.keyboardGestureRcognizer.isEnabled = false
304
+                
304 305
                 guard let userInfo = notification.element?.userInfo,
305 306
                     let timeInterval = userInfo[UIResponder.keyboardAnimationDurationUserInfoKey] as? TimeInterval,
306 307
                     let curve = userInfo[UIResponder.keyboardAnimationCurveUserInfoKey] as? Int

+ 12 - 12
PaiAi/Paiai_iOS/App/PhotoDetail/ShareController.swift

@@ -1,5 +1,5 @@
1 1
 //
2
-//  ShareController.swift
2
+//  ShareViewController.swift
3 3
 //  PaiAi
4 4
 //
5 5
 //  Created by zhengjianfei on 16/4/7.
@@ -10,24 +10,24 @@ import UIKit
10 10
 import PaiaiDataKit
11 11
 import PaiaiUIKit
12 12
 
13
-final class ShareController: UIViewController {
13
+final class ShareViewController: AlertViewController {
14 14
 
15
-    // MARK: Storyboard property
16 15
     @IBOutlet weak var shareView: UIView!
17
-
16
+    
17
+    override var animationView: UIView? {
18
+        return shareView
19
+    }
20
+    
21
+    override var style: AlertViewController.Style {
22
+        return .actionSheet
23
+    }
24
+    
18 25
    // MARK: parameter property
19 26
     var shareContent: String = ""
20 27
     var shareImg: UIImage?
21 28
     lazy var shareImgUrlThumb: String = ""
22 29
     lazy var shareUrl: String = ""
23
-//    let transitioning = FFTransitioning(alertStyle: .actionSheet)
24
-
25
-    required init?(coder aDecoder: NSCoder) {
26
-        super.init(coder: aDecoder)
27
-//        transitioningDelegate = transitioning
28
-    }
29
-
30
-    // MARK: view function
30
+    
31 31
     override func viewDidLoad() {
32 32
         super.viewDidLoad()
33 33
         let imageView = UIImageView()

+ 0 - 29
PaiAi/Paiai_iOS/App/PhotoDetail/ShareView.swift

@@ -1,29 +0,0 @@
1
-//
2
-//  ShareView.swift
3
-//  Paiai_iOS
4
-//
5
-//  Created by ffib on 2019/3/21.
6
-//  Copyright © 2019 yb. All rights reserved.
7
-//
8
-
9
-import UIKit
10
-
11
-class ShareView: UIView {
12
-    
13
-}
14
-
15
-
16
-
17
-extension ShareView {
18
-    
19
-    func activateConstraints() {
20
-        
21
-    }
22
-    
23
-    func activateConstraintsShareView() {
24
-        guard let superView = superview else { return }
25
-        
26
-        self.translatesAutoresizingMaskIntoConstraints = false
27
-        
28
-    }
29
-}

Makemigrations · 8fd8731267 - Gogs: Go Git Service

Makemigrations

Brightcells 7 年 前
コミット
8fd8731267
共有1 個のファイルを変更した20 個の追加0 個の削除を含む
  1. 20 0
      integral/migrations/0008_saleclerksubmitloginfo_test_sn.py

+ 20 - 0
integral/migrations/0008_saleclerksubmitloginfo_test_sn.py

@@ -0,0 +1,20 @@
1
+# -*- coding: utf-8 -*-
2
+# Generated by Django 1.11.16 on 2018-11-20 10:10
3
+from __future__ import unicode_literals
4
+
5
+from django.db import migrations, models
6
+
7
+
8
+class Migration(migrations.Migration):
9
+
10
+    dependencies = [
11
+        ('integral', '0007_auto_20180522_1147'),
12
+    ]
13
+
14
+    operations = [
15
+        migrations.AddField(
16
+            model_name='saleclerksubmitloginfo',
17
+            name='test_sn',
18
+            field=models.BooleanField(db_index=True, default=False, help_text='\u662f\u5426\u4e3a\u6d4b\u8bd5\u5e8f\u5217\u53f7', verbose_name='test_sn'),
19
+        ),
20
+    ]